<?php

/**
 * This is the model class for table "sys_epayment_log".
 *
 * The followings are the available columns in table 'sys_epayment_log':
 * @property integer $epayment_log_id
 * @property integer $epayment_log_network_id
 * @property string $epayment_log_refid
 * @property string $epayment_log_produk
 * @property string $epayment_log_idpelanggan
 * @property string $epayment_log_namapelanggan
 * @property integer $epayment_log_jumlahtagihan
 * @property integer $epayment_log_jumlahadm
 * @property integer $epayment_log_jumlahbayar
 * @property string $epayment_log_refnumber
 * @property string $epayment_log_pesan
 * @property string $epayment_log_status
 * @property string $epayment_log_code
 * @property string $epayment_log_rpcid
 * @property string $epayment_log_datetime
 */
class sys_epayment_log extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return sys_epayment_log the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'sys_epayment_log';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('epayment_log_network_id, epayment_log_refid, epayment_log_produk, epayment_log_idpelanggan, epayment_log_namapelanggan, epayment_log_jumlahtagihan, epayment_log_jumlahadm, epayment_log_jumlahbayar, epayment_log_refnumber, epayment_log_pesan, epayment_log_status, epayment_log_code, epayment_log_rpcid, epayment_log_datetime', 'required'),
			array('epayment_log_network_id, epayment_log_jumlahtagihan, epayment_log_jumlahadm, epayment_log_jumlahbayar', 'numerical', 'integerOnly'=>true),
			array('epayment_log_refid, epayment_log_produk, epayment_log_idpelanggan, epayment_log_namapelanggan, epayment_log_refnumber, epayment_log_pesan, epayment_log_status, epayment_log_code, epayment_log_rpcid', 'length', 'max'=>255),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('epayment_log_id, epayment_log_network_id, epayment_log_refid, epayment_log_produk, epayment_log_idpelanggan, epayment_log_namapelanggan, epayment_log_jumlahtagihan, epayment_log_jumlahadm, epayment_log_jumlahbayar, epayment_log_refnumber, epayment_log_pesan, epayment_log_status, epayment_log_code, epayment_log_rpcid, epayment_log_datetime', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'epayment_log_id' => 'Epayment Log',
			'epayment_log_network_id' => 'Epayment Log Network',
			'epayment_log_refid' => 'Epayment Log Refid',
			'epayment_log_produk' => 'Epayment Log Produk',
			'epayment_log_idpelanggan' => 'Epayment Log Idpelanggan',
			'epayment_log_namapelanggan' => 'Epayment Log Namapelanggan',
			'epayment_log_jumlahtagihan' => 'Epayment Log Jumlahtagihan',
			'epayment_log_jumlahadm' => 'Epayment Log Jumlahadm',
			'epayment_log_jumlahbayar' => 'Epayment Log Jumlahbayar',
			'epayment_log_refnumber' => 'Epayment Log Refnumber',
			'epayment_log_pesan' => 'Epayment Log Pesan',
			'epayment_log_status' => 'Epayment Log Status',
			'epayment_log_code' => 'Epayment Log Code',
			'epayment_log_rpcid' => 'Epayment Log Rpcid',
			'epayment_log_datetime' => 'Epayment Log Datetime',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('epayment_log_id',$this->epayment_log_id);
		$criteria->compare('epayment_log_network_id',$this->epayment_log_network_id);
		$criteria->compare('epayment_log_refid',$this->epayment_log_refid,true);
		$criteria->compare('epayment_log_produk',$this->epayment_log_produk,true);
		$criteria->compare('epayment_log_idpelanggan',$this->epayment_log_idpelanggan,true);
		$criteria->compare('epayment_log_namapelanggan',$this->epayment_log_namapelanggan,true);
		$criteria->compare('epayment_log_jumlahtagihan',$this->epayment_log_jumlahtagihan);
		$criteria->compare('epayment_log_jumlahadm',$this->epayment_log_jumlahadm);
		$criteria->compare('epayment_log_jumlahbayar',$this->epayment_log_jumlahbayar);
		$criteria->compare('epayment_log_refnumber',$this->epayment_log_refnumber,true);
		$criteria->compare('epayment_log_pesan',$this->epayment_log_pesan,true);
		$criteria->compare('epayment_log_status',$this->epayment_log_status,true);
		$criteria->compare('epayment_log_code',$this->epayment_log_code,true);
		$criteria->compare('epayment_log_rpcid',$this->epayment_log_rpcid,true);
		$criteria->compare('epayment_log_datetime',$this->epayment_log_datetime,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}